window: Include decoration border and padding in resize area
authorBenjamin Otte <otte@gnome.org>
Fri, 26 Feb 2016 05:49:35 +0000 (06:49 +0100)
committerBenjamin Otte <otte@gnome.org>
Sat, 27 Feb 2016 02:59:20 +0000 (03:59 +0100)
This is relevant for the Windows theme, which is the only theme that
uses padding on decorations. All other themes are unaffected.

gtk/gtkwindow.c

index 12ad04033417334b892b53b6202c3760c7d681c1..a5b9a27e2840434ce4d531beddd162dbca806b83 100644 (file)
@@ -6758,7 +6758,7 @@ update_border_windows (GtkWindow *window)
   cairo_region_t *region;
   cairo_rectangle_int_t rect;
   gint width, height;
-  GtkBorder border;
+  GtkBorder border, tmp;
   GtkBorder window_border;
   GtkStyleContext *context;
 
@@ -6769,6 +6769,10 @@ update_border_windows (GtkWindow *window)
 
   gtk_style_context_save_to_node (context, priv->decoration_node);
   gtk_style_context_get_margin (context, gtk_style_context_get_state (context), &border);
+  gtk_style_context_get_border (context, gtk_style_context_get_state (context), &tmp);
+  sum_borders (&border, &tmp);
+  gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &tmp);
+  sum_borders (&border, &tmp);
   gtk_widget_style_get (widget,
                         "decoration-resize-handle", &handle,
                         NULL);